{include file="common/header.tpl"}
{if $AppUI->id <= 0}
	{include file="index/login.tpl"}  
{else}
	{include file="common/menu.tpl"}
    <div class="rightColumn">
    	<div class="boxContent">
        	<div class="contentItem">
                <div class="contentItems">
                	<div class="headerTitle"><h2><a href="{$smarty.const.HOST_BACKEND}product/manufactory">Nhà cung cấp</a> &raquo; Thêm mới</h2></div>
                    <div class="secData">
                    	<form name="frmAdd" id="frmAdd" method="post" enctype="multipart/form-data" action="{$smarty.const.HOST_BACKEND}product/manufactorys">                        	
                        	{if isset($smarty.session.manuerr)}
                            	<div class="userInput">
                                    <span class="errorMessage">{$smarty.session.manuerr}</span>
                                </div>
                            {/if}
                            {if $smarty.const.LANGUAGE_MULTI}
                            	<div class="userInput">
                                    <label for="planguage">Ngôn ngữ:</label>
                                    <select name="planguage" id="planguage">
                                    	{if isset($smarty.session.manupost.planguage)}
                                        	{html_options options=$arrLang selected=$smarty.session.manupost.planguage}
                                        {else}
                                    		{html_options options=$arrLang selected=$smarty.session.lang}
                                        {/if}
                                    </select>
                                </div>
                            {else}
                            	<input type="hidden" name="planguage" id="planguage" value="{$smarty.const.LANGUAGE_VN}" />
                            {/if}
                            <div class="userInput">
                            	<label for="pname">Tên <span class="symbolRequired">*</span>:</label>
                                <input type="text" class="text" name="pname" id="pname" value="{if isset($smarty.session.manupost.pname)}{$smarty.session.manupost.pname}{/if}" maxlength="255" />
                            </div>
                            <div class="userInput">
                                <label for="pimage">Logo <span class="symbolRequired">*</span>:</label>
                                <input type="file" class="text" name="pimage" id="pimage" value="" />
                            </div>
                            <div class="userInput">
                            	<label for="pcountry">Quốc gia:</label>
                                <select name="pcountry" id="pcountry" onchange="javascript:loadProvince(this.value,'pprovince','divProvince');loadDistrict(0,'pdistrict','divDistrict');">
                                	<option value="0">Chọn</option>
                                    {html_options options=$arrCountry selected=$strCountry}
                                </select>
                            </div> 
                            <div class="userInput" id="divProvince">
                            	<label for="pprovince">Tỉnh/thành:</label>
                                <select name="pprovince" id="pprovince" onchange="javascript:loadDistrict(this.value,'pdistrict','divDistrict');">
                                	<option value="0">Chọn</option>
                                    {html_options options=$arrProvince selected=$intProvince}
                                </select>
                            </div>
                            <div class="userInput" id="divDistrict">
                            	<label for="pdistrict">Quận/huyện:</label>
                                <select name="pdistrict" id="pdistrict">
                                	<option value="0">Chọn</option>
                                    {html_options options=$arrDistrict selected=$smarty.session.manupost.pdistrict}
                                </select>
                            </div> 
                            <div class="userInput">
                            	<label for="paddr">Địa chỉ:</label>
                                <input type="text" class="text" name="paddr" id="paddr" value="{if isset($smarty.session.manupost.paddr)}{$smarty.session.manupost.paddr}{/if}" maxlength="150" />
                            </div>
                            <div class="userInput">
                            	<label for="ptel">Điện thoại:</label>
                                <input type="text" class="text" name="ptel" id="ptel" value="{if isset($smarty.session.manupost.ptel)}{$smarty.session.manupost.ptel}{/if}" maxlength="50" />
                            </div> 
                            <div class="userInput">
                            	<label for="pfax">Fax:</label>
                                <input type="text" class="text" name="pfax" id="pfax" value="{if isset($smarty.session.manupost.pfax)}{$smarty.session.manupost.pfax}{/if}" maxlength="50" />
                            </div> 
                            <div class="userInput">
                            	<label for="pwebsite">Website:</label>
                                <input type="text" class="text" name="pwebsite" id="pwebsite" value="{if isset($smarty.session.manupost.pwebsite)}{$smarty.session.manupost.pwebsite}{/if}" maxlength="250" />
                            </div>     
                            <div class="userInput">
                            	<label for="pshort">Tóm lược:</label>
                                <textarea rows="1" cols="1" name="pshort" id="pshort">{$smarty.session.manupost.pshort}</textarea>
                            </div>
                            <div class="userInput">
                                <label for="pcontent">Giới thiệu:</label>
                                {if isset($smarty.session.edupost.pcontent)}
                                    {"pcontent"|fck:$smarty.session.manupost.pcontent:"Admin":"560":"400px"}
                                {else}
                                    {"pcontent"|fck:"":"Admin":"560":"400px"}
                                {/if}
                            </div>                                            
                            <div class="secAction">
                        		<input type="submit" value="Lưu dữ liệu"/>
                               	<input type="reset" value="Nhập lại"/>
                            </div>
                        </form>
                   	</div>
                </div>
          	</div>
        </div>
    </div>
{/if}
{include file="common/footer.tpl"}
                
